<#import "/spring.ftl" as spring />

<#include "/tags/commentTag.ftl">
<#include "/tags/commentBoxTag.ftl">
<#include "/tags/userEntryTag.ftl">
<#include "/tags/userHowIDoneTag.ftl">
<#include "/tags/editEntryTag.ftl">

<#if data.recentEntries?exists>
<#list data.recentEntries as entry>	
	<#if (entry.entryType == 1)>		
		<!-- entry view -->
		<div class="w4"></div>
		<div id="entry_holder_${entry.id}">	      
			<@entryView entryId=entry.id goalId=entry.goalId goalTitle=entry.goalTitle 
		  		  youLikeThis=entry.youLikeThis likeCount=entry.likeCount cheerCount=entry.cheerCount 
		  		  commentCount=entry.commentCount body=entry.body title=entry.title imgURL=entry.imgURL 
		  		  entryUpdatedSince=entry.updatedSince createdDate=entry.createdDate createdMonth=entry.createdMonth
		  		  createdYear=entry.createdYear ownerName=entry.ownerName goalCreatedDate=entry.goalCreatedDate comments=entry.comments/>		      		  	
		</div>
		<!-- end of entry view -->
		
		<!-- edit entry holder -->
		<div id="edit_entry_holder_${entry.id}">
		</div>
		<!-- end edit entry holder -->
	<#else>
		<div id="entry_done_holder_${entry.id}" class="archicle">
			<@userHowIDone title=entry.title goalId=entry.goalId goalTitle=entry.goalTitle 
					   youLikeThis=entry.youLikeThis likeCount=entry.likeCount cheerCount=entry.cheerCount
					   ownerName=entry.ownerName experience=entry.experience 
					   tookType=entry.tookType tookAmount=entry.tookAmount 
					   imgURL=entry.imgURL solution=entry.solution 
					   tip=entry.tip resources=entry.resources entryId=entry.id 
					   cheerCount=entry.cheerCount commentCount=entry.commentCount
					   createdDate=entry.createdDate createdMonth=entry.createdMonth 
					   createdYear=entry.createdYear ownerAvatar=entry.ownerAvatar 
					   entryUpdatedSince=entry.updatedSince comments=comments/>			
		</div>	
	</#if>		
	<#assign lastItem=entry/>	
</#list>
<#if lastItem?? && lastItem.ownerId??>
<div id="next_page_scroll" class="userEntryView;${lastItem.ownerId};" rel="${lastItem.sortedValue}" style="float:left"></div>
<div id="scroll_loader" style="display: none; width: 100%; float: left; padding-top: 30px;">
	<center>
	<img src="/images/loader.gif"/>
	</center>
</div>
<div id="show_more" class="wallReadmore">
	<a href="#" id="show_more_button">Hiển thị các bài viết cũ hơn</a>
</div>
</#if>
</#if>      